package comits.business.tiers.dao;

import java.util.List;

import org.hibernate.SQLQuery;
import org.hibernate.context.ManagedSessionContext;

import comits.business.tiers.metiers.Boutique;
import comits.business.tiers.metiers.StatutLigneCommande;
import comits.business.tiers.orm.hibernate.HibernateSession;

public class StatutLigneCommandeDAOImpl implements StatutLigneCommandeDAO {
	
	public List<StatutLigneCommande> recupererStatut() {
		SQLQuery sql = HibernateSession.currentSession().createSQLQuery(PropertiesConfig.Get("SelectAllStatut")).addEntity(StatutLigneCommande.class);
		
		/*SQLQuery sql = HibernateSession.currentSession()
		.createSQLQuery("select * from statutLigneCommande")
		.addEntity(StatutLigneCommande.class);*/
		
		List<StatutLigneCommande> list = sql.list();

		ManagedSessionContext.unbind(HibernateSession.getSessionFactory());
			return list;
	}
}
